Skip to content

Collect Flows signup decisions on the web - #116

Merged
miyaontherelay merged 11 commits into
mainfrom
codex/flows-web-input
Sep 25, 2026
Merged

miyaontherelay merged 11 commits into
mainfrom
codex/flows-web-input

Conversation

@kjgbot

@kjgbot kjgbot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Builds on #112.

Moves the agent signup follow-up answers into the Flows signup page, with web-based selection/text controls, a saved-draft result, and copy that keeps local house-key and sync constraints accurate. Agent actions still go through the Cloud progress/input APIs; the page never receives the progress token.

Validation: all 320 marketing workspace tests pass (248 web, 72 router); diff check clean.

Dependent Cloud API PR follows. Before merging to main, rebase/retarget after #112. The separate Codex wake-up/injection work remains with the other agent.


Note

Medium Risk
Adds a new authenticated PUT path and UI for signup answers tied to the progress token; incorrect validation or copy could block Flows onboarding, but scope is limited to the signup funnel rather than core auth.

Overview
Flows agent signup now collects repository, workflow, and approver choices on the signup page instead of in chat. Progress polling can surface an inputRequest (text, select, or inactive-preview notice); the owning tab submits answers with PUT and the progress write token, with UI and copy for pending, answered, and draft-saved states.

Agent-facing docs and prompts add the web-input protocol (POST to request, poll GET for answers), tighten Flows integration polling (oauth.connected, sync readiness), and document house-key / draft-notice behavior. Progress typing validates inputRequest (including restricted notice actionHref).

Local dev: the /signup/agent/[product] route preserves localhost vs 127.0.0.1 from the Host header when Next normalizes request.url, so guide URLs match the browser for OAuth and the progress page.

Tests cover validation, guide strings, hostname edge cases, and an e2e path for answered inputs at step zero.

Reviewed by Cursor Bugbot for commit 4710e6f. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 18df8cd7-f892-4ba0-a5f6-dbfe2048fc6b


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployed!

Environment URL
Web https://f8a84f71-agentrelay-web.agent-workforce.workers.dev

This is a Cloudflare Workers preview version of this PR's build.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread web/components/AgentSignupJourney.tsx Outdated
{complete ? <a onClick={() => { if (token) analytics.track('dashboard_opened', active); }} className={s.primary} href={teamsCloudUrl(product === 'teams' ? '/dashboard/sessions' : '/dashboard')}>Open {product === 'teams' ? 'your workspace' : 'dashboard'} <ArrowUpRight size={17} /></a>
: !active ? <button type="button" className={s.primary} disabled={!prompt || expired} onClick={() => void copy()}>{copyMessage.startsWith('Copied') ? <Check size={17} /> : <Copy size={17} />}{copyMessage.startsWith('Copied') ? 'Prompt copied' : 'Copy setup prompt'}</button> : null}
<p className={s.copyStatus} role="status">{complete ? '' : active ? (paused ? 'Your agent will continue after you approve.' : 'You can leave this page open.') : copyMessage || (progress && !token ? 'Watching this session. The prompt is in the original browser tab.' : product === 'teams' ? 'Paste into a coding agent on your Mac.' : 'Paste into a coding agent with terminal access.')}</p>
<p className={s.copyStatus} role="status">{complete ? '' : notice ? 'No action is required to keep this draft saved.' : active ? (inputRequest?.status === 'pending' ? 'Your answer goes straight to your agent.' : paused ? (product === 'flows' && inputRequest?.status === 'answered' ? 'Your agent is processing your answer.' : 'Your agent will continue after you approve.') : 'You can leave this page open.') : copyMessage || (progress && !token ? 'Watching this session. The prompt is in the original browser tab.' : product === 'teams' ? 'Paste into a coding agent on your Mac.' : 'Paste into a coding agent with terminal access.')}</p>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending input ignored at step zero

Low Severity

heading and the input card treat a pending inputRequest as actionable at any step, but the subtitle, agent logos, and copy-prompt button still key off active. A question posted while step is 0 keeps the original waiting copy and CTA beside the new answer form.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0c83f55. Configure here.

…elay.com into fix/agentrelay-116-review

# Conflicts:
#	web/components/AgentSignupJourney.tsx
@khaliqgant

Copy link
Copy Markdown
Member

Review audit + base merge at cfd88f1 (release lead, sole writer — PR was unowned):

  • Merged updated base codex/agent-signup@4c129bb (carries the Add agent-driven signup with live progress and Relay animation #112 expired/retry/analytics fixes) — resolved the render-block conflict preserving both sides.
  • Bugbot Low — pending input ignored at step zero: FIXED. At step: 0 a pending inputRequest now owns the page state: subtitle falls through to the input detail ('Answer on this page and your agent will keep going.'), the agent-logo row and copy-prompt CTA hide, copyStatus shows 'Your answer goes straight to your agent.', and the progress line reads 'Waiting for your answer'. notice previews keep their dedicated copy. Also carried over the base's expired/failed gating so a dead session can no longer masquerade as waiting.

Tests: vitest run — 26 files, 250 tests green; tsc --noEmit clean. Requesting fresh review; merge held behind #112 (stacked base) per dependency order.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread web/components/AgentSignupJourney.tsx Outdated
<p className={s.copyStatus} role="status">{complete ? '' : active ? (paused ? 'Your agent will continue after you approve.' : 'You can leave this page open.') : copyMessage || (expired ? '' : progress && !token ? 'Watching this session. The prompt is in the original browser tab.' : product === 'teams' ? 'Paste into a coding agent on your Mac.' : 'Paste into a coding agent with terminal access.')}</p>
: !active && !expired && inputRequest?.status !== 'pending' ? <button type="button" className={s.primary} disabled={!prompt} onClick={() => void copy()}>{copyMessage.startsWith('Copied') ? <Check size={17} /> : <Copy size={17} />}{copyMessage.startsWith('Copied') ? 'Prompt copied' : 'Copy setup prompt'}</button> : null}
<p className={s.copyStatus} role="status">{complete ? '' : expired ? '' : notice ? 'No action is required to keep this draft saved.' : inputRequest?.status === 'pending' ? 'Your answer goes straight to your agent.' : active ? (paused ? (product === 'flows' && inputRequest?.status === 'answered' ? 'Your agent is processing your answer.' : 'Your agent will continue after you approve.') : 'You can leave this page open.') : copyMessage || (progress && !token ? 'Watching this session. The prompt is in the original browser tab.' : product === 'teams' ? 'Paste into a coding agent on your Mac.' : 'Paste into a coding agent with terminal access.')}</p>
{inputRequest && !expired && !complete && (inputRequest.status === 'pending' || paused) && <section className={s.inputCard} aria-label={notice ? 'Flow preview status' : 'Question from your agent'}>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Answered input lost at step zero

Medium Severity

After a Flows answer succeeds while progress is still at step 0, paused stays false, so the input card and “answer received” copy never appear. The page falls back to the initial waiting state and shows Copy setup prompt again, which hides confirmation and can look like setup reset.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 179fd84. Configure here.

@miyaontherelay miyaontherelay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO-GO — review at exact head 179fd84, against stacked #112 base e8d60fb.

The #112 stack dependency is correct and #112 is independently GO at e8d60fb. However #116 is not merge-ready at this exact head:

  1. Deploy Preview is terminal FAILURE (run 35821318463, job 107053596618). Tests/typecheck pass, but the failed preview must be fixed and rerun successfully.
  2. The diff commits two absolute local node_modules symlinks: node_modules -> /home/khaliqgant/Projects/AgentWorkforce/agentrelay-112-fix/node_modules and web/node_modules -> /home/khaliqgant/Projects/AgentWorkforce/agentrelay-112-fix/web/node_modules. These are non-reproducible machine-local paths and must be removed before merge.

The input-request journey changes otherwise preserve the progress-token boundary and answer handling, but I cannot give GO while the preview is failing and repository contains machine-local dependency links. Please push a corrected head, rerun exact-head CI/preview, and request re-review.

Base automatically changed from codex/agent-signup to main September 23, 2026 06:50
Session-Id: 01a0cc08-1399-7b02-871e-542dc1e28509

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread web/components/AgentSignupJourney.tsx Outdated
// An answered web-input request can arrive before the agent advances the
// numbered progress step. Keep the response card visible at step 0 so the
// user sees confirmation instead of the initial copy-prompt state.
const answeredInput = product === 'flows' && inputRequest?.status === 'answered';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Answered input overrides later progress

Medium Severity

answeredInput is true for any answered inputRequest, so it now wins over a later working step. After the first answer, heading, mode, and the input card can stay on confirmation instead of the current setup step.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7528c00. Configure here.

Comment thread web/components/AgentSignupJourney.tsx Outdated
<div className={s.progress} role="status" aria-live="polite">
<div className={s.progressDots} aria-hidden="true">{steps.map((step, index) => <i key={step.title} data-done={complete || active > index + 1} data-current={!complete && active === index + 1} />)}</div>
<span>{expired ? 'Session expired' : error ? 'Waiting for a connection' : complete ? 'Setup complete' : active ? `${active} of 5 · ${paused ? 'Waiting for your approval' : failed ? 'Needs your attention' : steps[active - 1].title}` : progress ? 'Ready when your agent is' : 'Preparing your session…'}</span>
<span>{expired ? 'Session expired' : error ? 'Waiting for a connection' : complete ? 'Setup complete' : notice ? `${active} of 5 · Preview saved; activation pending` : inputRequest?.status === 'pending' ? 'Waiting for your answer' : answeredInput ? `${active} of 5 · Answer received` : active ? `${active} of 5 · ${paused ? 'Waiting for your approval' : failed ? 'Needs your attention' : steps[active - 1].title}` : progress ? 'Ready when your agent is' : 'Preparing your session…'}</span>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Progress label shows zero of five

Low Severity

An answered request at step 0 now renders the live progress label as 0 of 5 · Answer received. The five setup steps are 1-based, so that count is wrong. Pending input at step 0 already omits a step number.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7528c00. Configure here.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread web/components/AgentSignupJourney.tsx Outdated
// An answered web-input request can arrive before the agent advances the
// numbered progress step. Keep that step-zero confirmation visible, but do
// not let a stale answered request override a later progress step.
const answeredInput = product === 'flows' && active === 0 && inputRequest?.status === 'answered';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Answered input treated as approval

Medium Severity

answeredInput is true only at step 0, but Flows web-input questions are asked at the current waiting step. After submit, heading, subtitle, and progress therefore fall through to approval-waiting copy, while paused can also keep a stale answered inputRequest card visible during a later real approval.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a4ea273. Configure here.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 8 files

You’re at about 98% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread web/app/signup/agent/[product]/route.ts Outdated
Comment thread web/lib/agent-signup-progress.ts Outdated
Comment thread web/components/agent-signup-journey.module.css Outdated
Comment thread web/components/AgentSignupJourney.tsx Outdated
Comment thread web/lib/test/agent-signup-progress.test.ts

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f6203be. Configure here.

Comment thread web/components/AgentSignupJourney.tsx Outdated
const observedInputStep = observedInput && observedInput.id === inputRequest?.id ? observedInput.step : active;
// Keep confirmation visible at the step where the question was observed,
// including step zero. A stale answer must not override later progress.
const answeredInput = inputRequest?.status === 'answered' && progress?.state === 'waiting' && observedInputStep === active;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reload treats leftover answers as current

Medium Severity

When inputRequestStep has no matching observation, observedInputStep falls back to active, so answeredInput is true for any answered request still in waiting. A reload, session restore, or late watcher that first sees a leftover answered inputRequest at a later approval step shows answer-received copy instead of the approval state.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f6203be. Configure here.

@miyaontherelay miyaontherelay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseding exact-head review at 4710e6f. The prior CHANGES_REQUESTED review was for 179fd84 and is superseded: Deploy Preview now succeeds, the tracked absolute node_modules symlinks are removed, and the answered-input-at-step-zero defect is fixed with step-bound rendering/regressions. Fresh Tests/typecheck, Deploy Preview, Cursor, and Cubic checks are successful. Independent exact-head audit reports no remaining substantive blocker. Approve current head pending final mergeability/dependency gate recheck.

@miyaontherelay
miyaontherelay merged commit 9864999 into main Sep 25, 2026
5 checks passed
@miyaontherelay
miyaontherelay deleted the codex/flows-web-input branch September 25, 2026 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants